<template>
    <div>
      <h2>入党积极分子公示</h2>
      <ul>
        <li v-for="student in activeMembers" :key="student.name">{{ student.name }}</li>
      </ul>
    </div>
  </template>
  
  <script>
  export default {
    name: 'Publicity',
    data() {
      return {
        students: [
          { name: 'hh', isApply: true, is18: false },
          { name: 'ww', isApply: true, is18: true },
          { name: 'jj', isApply: false, is18: true },
          { name: '1', isApply: true, is18: false },
          { name: '2', isApply: true, is18: true },
          { name: '3', isApply: true, is18: true },
          { name: '4', isApply: false, is18: false },
          { name: '5', isApply: true, is18: true },
          { name: '6', isApply: true, is18: true },
          { name: '7', isApply: true, is18: true }
        ]
      };
    },
    computed: {
      activeMembers() {
        return this.students.filter(student => student.isApply && student.is18);
      }
    }
  };
  </script>
  
